package com.ryenlii.datatrans.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.sql.Timestamp;

/**
 * 学生信息
 *
 * @author zhengwen
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("student")
public class Student extends Model<Student> {

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Timestamp createTime;

    @TableId
    private Long id;

    private String no;

    private String name;

    private Integer age;

    private Integer sex;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    private Timestamp birthday;

    @TableField(value = "create_id")
    private Long createId;

    @TableField(value = "is_deleted")
    private Integer isDeleted;
}
